import request from '@/utils/request'


export function getActivities(activitiesData) {
  return request({
    url: '/activities/lists',
    method: 'post',
    data: activitiesData
  })
}

export function getQrCode(id) {
  return request({
    url: 'acenroll/getQrCode/' + id,
    method: 'get'
  })
}

export function sendEventToWechat() {
  return request({
    url: 'acenroll/sendEventToWechat',
    method: 'get'
  })
}

export function addOrEditActivities(activitiesData) {
  return request({
    url: 'activities/addOrEdit',
    method: 'post',
    data: activitiesData
  })
}

export function getActivityEnroll(queryEnrollCondition) {
  return request({
    url: 'acenroll/lists',
    method: 'post',
    data: queryEnrollCondition
  })
}
export function getActivityEnrollSigned(queryEnrollCondition) {
  return request({
    url: 'acenroll/slists',
    method: 'post',
    data: queryEnrollCondition
  })
}
export function addOrEditActivitiesEnroll(activitiesEnrollData) {
  return request({
    url: 'acenroll/addOrEdit',
    method: 'post',
    data: activitiesEnrollData
  })
}

export function getActivitiesById(activitiesData) {
  return request({
    url: 'activities/get',
    method: 'post',
    data: activitiesData
  })
}

export function getActivityEnrollFields(activityEnrollData) {
  return request({
    url: 'acenrollfield/lists',
    method: 'post',
    data: activityEnrollData
  })
}

export function setActivityEnrollFields(activityEnrollData) {
  return request({
    url: 'acenrollfield/addOrEdit',
    method: 'post',
    data: activityEnrollData
  })
}

export function getActivityTickets(activityTicketsData) {
  return request({
    url: 'actickets/lists',
    method: 'post',
    data: activityTicketsData
  })
}

export function getActivityTicketsById(activityTicketsData) {
  return request({
    url: 'actickets/get',
    method: 'post',
    data: activityTicketsData
  })
}

export function setActivityTickets(activityTicketsData) {
  return request({
    url: 'actickets/addOrEdit',
    method: 'post',
    data: activityTicketsData
  })
}
export function wxPush(data) {
  return request({
    url: `/activities/wxPush`,
    method: 'post',
    data
  })
}

export function catList(query) {
  return request({
    url: '/activities/catList',
    method: 'get',
    params: query
  })
}

export function catDel(query) {
  return request({
    url: '/activities/catDel',
    method: 'get',
    params: query
  })
}

export function catAdd(data) {
  return request({
    url: `/activities/catAdd`,
    method: 'post',
    data
  })
}

